package com.physique.tea.Controller;

import com.physique.tea.Global.Result;
import com.physique.tea.Service.HistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/history")
public class HistoryController {

    @Autowired
    HistoryService historyService;

    @GetMapping("/getbyusername")
    public @ResponseBody Result getHistoryByUsername(@RequestParam("username") String username){
        return historyService.getHistoryByUsername(username);
    }
    
}
